package config

type wechatLogFile struct {
	Level  string `yaml:"level"`
	File   string `yaml:"file"`
	Error  string `yaml:"error"`
	Stdout bool   `yaml:"stdout"`
}

type weChatConfig struct {
	Appid     string        `yaml:"appid"`
	Secret    string        `yaml:"secret"`
	HttpDebug bool          `yaml:"http_debug"`
	Log       wechatLogFile `yaml:"log"`
}

var WeChatConfig weChatConfig

func init() {
	WeChatConfig.Appid = "123"
	WeChatConfig.Secret = "123456"
	WeChatConfig.HttpDebug = true

	WeChatConfig.Log.Level = "debug"
	WeChatConfig.Log.File = "/runtime/wechat/mini-program/info.log"
	WeChatConfig.Log.Error = "/runtime/wechat/mini-program/error.log"
	WeChatConfig.Log.Stdout = true
}
